<taglib name='Html' />
<div class="Item hr">
    <div class="fr"><a href="{:U('index')}" class="btn">栏目管理</a></div>
    <div class="current">添加栏目</div>
</div>
<form>
	<input type="hidden" name="type[topid]" value="{$topid}" />
	<!--<input type="hidden" name="type[reid]" value="{$reid}" />-->
    <div class="Item hr">
        <div class="current">常规选项</div>
    </div>
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table1">
        <tr>
            <th width="100">是否隐藏栏目：</th>
            <td class="bline">
                <label><input type="radio" checked="checked" value="0" name="type[ishidden]">
              显示&#12288;</label>&nbsp;
              <label><input type="radio" value="1" name="type[ishidden]">
              隐藏</label>
             </td>
        </tr>
        <tr>
            <th width="100"><span class="red">内容模型：</span></th>
            <td>
            	<select name="type[model_id]" id="model_id">
                	<volist name='models' id='model'>
                	<option value="{$model.id}" <if condition="$model['id'] eq $model_id">selected="true"</if>>{$model.name}|{$model.nid}</option>
                    </volist>
                </select>
             </td>
        </tr>
        <present name="language">
        <tr>
            <th width="100"><span class="red">所属语言：</span></th>
            <td>
            <html:select options="language" name="type[lang]" id="lang" />
             </td>
        </tr>
        </present> 
        <tr>
            <th width="100"><span class="red">上级栏目：</span></th>
            <td>
            	<select name="type[reid]" id="reid">
                	<option value="0" <if condition="$reid eq 0">selected="true"</if>>顶级栏目</option>
                <present name="language">
                	<volist name='types' id='m'>
                    <optgroup label="{$m.title}">
                        <volist name='m.cat' id='type'>
                            <option value="{$type.id}" <if condition="$type['id'] eq $reid">selected="true"</if>>{$type.fullname}</option>
                        </volist>
                    </optgroup>
                    </volist>
                <else/>
                	<volist name='types' id='type'>
                	<option value="{$type.id}" <if condition="$type['id'] eq $reid">selected="true"</if>>{$type.fullname}</option>
                    </volist>
                 </present> 
               </select>
             </td>
        </tr>
        <tr>
            <th width="100"><span class="red">栏目名称：</span></th>
            <td><input id="typename" type="text" class="input" size="20" name="type[typename]" value="" /> </td>
        </tr>
        <tr>
            <th width="100">排列顺序：</th>
            <td><input id="sortrank" type="text" class="input" size="5" name="type[sortrank]" value="50" /> （由低 -> 高） </td>
        </tr>
        <tr class="hide">
            <th width="100">上级栏目：</th>
            <td>
                <php>
                    $pardir = '{cmspath}'.C('HTML_DIR');
                    if(!empty($typedir)) $pardir = $typedir.'/';
                    $pardir = preg_replace("#\/{1,}#", '/', $pardir);
                    echo $pardir;
                </php>
              <input name="nextdir" type="hidden" id="nextdir" value="<?php echo $pardir?>" />
            </td>
        </tr>
        <tr class="hide">
            <th width="100">目录相对位置：</th>
            <td>
                <label><input type="radio" checked="chekced" value="parent" class="np" id="truepath1" name="referpath"> 上级目录</label>
                <label><input type="radio" value="cmspath" class="np" id="truepath2" name="referpath"> CMS根目录</label>
                <label><input type="radio" value="basepath" class="np" id="truepath3" name="referpath"> 站点根目录</label>
            </td>
          </tr>
        <tr class="hide">
            <th>栏目列表选项：</th>
            <td>
            <input type="radio" value="-1" name="type[isdefault]" checked="checked" >
            使用动态页
            <input type="radio" value="1" name="type[isdefault]">
            链接到默认页
            <input type="radio" value="0" name="type[isdefault]">
            链接到列表第一页
            </td>
        </tr>          
        <tr class="hide">
            <th>默认页的名称： </th>
            <td>
            <input type="text" class="input" value="index.html" name="type[defaultname]">
            </td>
        </tr>        
          <tr>
            <th width="100">栏目属性：</th>
            <td>
                <label><input type="radio" checked="checked" class="ispart" value="0" id="radio" name="type[ispart]">
              最终列表栏目（允许在本栏目发布文档，并生成文档列表）</label> <br>
              <label><input type="radio" class="ispart" value="1" id="radio" name="type[ispart]">
              频道封面（栏目本身不允许发布文档）</label> <br>
              <label><input type="radio" class="ispart" value="2" id="radio" name="type[ispart]">
              外部连接（在"外部连接"处填写网址）</label>
             </td>
          </tr>
        <tr class="typedir hide">
            <th width="100">外部连接：</th>
            <td><input id="typedir" type="text" class="input" size="30" name="type[typedir]" value="" /></td>
        </tr>
    </table>
    <div class="Item hr">
        <div class="current">高级选项</div>
    </div>
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table1">
        <tr>
            <th width="100">封面模板：</th>
            <td><input id="tempindex" type="text" class="input" size="40" name="type[tempindex]" value="index" /> </td>
        </tr>
        <tr>
            <th width="100">列表模板：</th>
            <td><input id="templist" type="text" class="input" size="40" name="type[templist]" value="list" /> </td>
        </tr>
        <tr>
            <th width="100">文章模板：</th>
            <td><input id="temparticle" type="text" class="input" size="40" name="type[temparticle]" value="content" /> </td>
        </tr>
        <tr class="hide">
            <th width="100">文章命名规则：</th>
            <td><input id="namerule" type="text" class="input" size="40" name="type[namerule]" value="{typedir}/{Y}/{M}{D}/{aid}.html" /> </td>
        </tr>
        <tr class="hide">
            <th width="100">列表命名规则：</th>
            <td><input id="namerule2" type="text" class="input" size="40" name="type[namerule2]" value="{typedir}/list_{tid}_{page}.html" /> </td>
        </tr>
        <tr>
            <th width="100">SEO标题：</th>
            <td><input id="seotitle" type="text" class="input" size="40" name="type[seotitle]" value="" /> </td>
        </tr>
        <tr>
            <th width="100">关键字：</th>
            <td>
            <textarea class="jq_watermark" id="keywords" rows="1" cols="70" name="type[keywords]"  placeholder="多个关键字用半角逗号“,”隔开"></textarea> 
            </td>
        </tr>
        <tr>
            <th width="100">栏目描述：</th>
            <td><textarea class="jq_watermark" id="description" rows="5" cols="70" name="type[description]"  placeholder="栏目描述"></textarea> </td>
        </tr>
    </table>
    <div class="Item hr">
        <div class="current">栏目内容</div>
    </div>
    <table width="100%" border="0" cellspacing="0" cellpadding="0" class="table1">
    	<tr><td>说明：栏目内容是替代原来栏目单独页的更灵活的一种方式，可在栏目模板中用<literal>{$content}</literal>调用，通常用于企业简介之类的用途。</td></tr>
    	<tr><td>{:genEditor('type[content]', '', 120, 20, '1')}</td></tr>
    </table>
</form>
<div class="commonBtnArea" >
    <button class="btn submit">提交</button>
</div>

<include file="Contype/javascript" />
<script type="text/javascript">
$(function(){
    submitForm("create");
});
</script>
